<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />

    <link rel="stylesheet" type="text/css" href="../../css/colleague.css" />

    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/jquery.js"></script>

    <!-- <script type="text/javascript">
    apiready=function(){
    }
    </script> -->
    <script type="text/javascript" src="../../script/main.js"></script>
    <script type="text/javascript" src="../../script/bootstrap.js"></script>
</head>
<body>
  <div id="header">
      <div id="back"></div>
      <h3>个人信息</h3>
      <!-- <div class="preview">预览</div> -->
  </div>
  <div class="basic">
      <div class="information">基本信息</div>
      <!-- <div class="basic_img"></div> -->
      <!-- <div class="edit_btn">
        <div class="edit_btn_img"></div>
        <div class="edit_btn_span" >
          <a onclick="openPage('change','change.html')"><span>编辑</span></a>
        </div>
    </div> -->
  </div>
  <div class="edit">
    <table class="table">
      <tbody>
        <span class="t_span">当前无任何信息！</span>
     </tbody>
    </table>
  </div>
</body>
<script>
apiready=function(){
  back();
  var url='/student/info';
  var functionRet=function(ret){
    if(ret.code==0){
      var gender;
      $(".t_span").remove();
      if(ret.data.gender == 1){
        gender = "男";
      }
      else if(ret.data.gender == 0){
        gender = "女";
      }else{
        gender = "未选择";
      }
      var school=ret.data.school;
      var grade=ret.data.grade;
      var major=ret.data.major;
      var email=ret.data.email;
      if(school==null){
        school='未选择文案'
      }if(grade==null){
        grade='未选择文案'
      }if(major==null){
        major='未选择文案'
      }if(email==null){
        email='未选择文案'
      }
      var templates="<tr><td>"+"昵称："+ret.data.name+"</td></tr></td>"+"<tr><td>"+"学校："+school+"</td></tr>"+
      "<tr><td>"+"性别："+gender+"</td></tr>"+"<tr><td>"+"年级："+grade+"</td></tr>"+
      "<tr><td>"+"专业:"+major+"</td></tr>"+"<tr><td>"+"邮箱："+email+"</td></tr>"+
      "<tr><td>"+"手机号码："+ret.data.phone+"</td></tr>";
      $(".edit .table:eq(0) tbody").append(templates);
    }else{
      toast("加载简历失败！","bottom");
    }
  }
  var functionErr=function(err){
  }
  getNew(url,functionRet,functionErr);
}
</script>
</html>
